﻿@model ManifestListModel
<div id="manifests-list">
    @if (!Model.CurrentManifest.IsDefaultLatest)
    {
        <div>
            @if (Model.Artefact != null)
            {
                <a href="@Model.Artefact.Path(null)">Latest</a>
            }
            else
            {<a href="@HttpContext.Current.Request.ApplicationPath">Latest</a>}
        </div>
    }
    @foreach (var manifest in Model.Manifests)
    {
        if (Model.CurrentManifest.IsDefaultLatest || Model.CurrentManifest.Version != manifest.Version)
        {
        <div>
            @if (Model.Artefact != null)
            {
                <a href="@Model.Artefact.Path(manifest)">@manifest.Name</a>
            }
            else
            {
                <a href="@Html.GetVersionedHomePath(manifest)">@manifest.Name</a>
            }
            @if (!string.IsNullOrEmpty(manifest.Comment))
            {
                <div class="tiny-text">@manifest.Comment</div>
            }
        </div>
        }
    }
</div>
